package com.renchunlin.looerpager.utils

import android.content.Context

/*
 * class title: 
 * Author by RenChunLin, Email 18957806320@163.com, Date on 2021/6/17.
 * PS: Not easy to write code, please indicate.
 */
class SizeUtils {
    companion object {
        fun dip2px(context: Context, dpValue: Float): Int {
            val density = context.resources.displayMetrics.density
            return (dpValue * density + 0.5f).toInt()
        }
    }
}